int numEquivDominoPairs(int** dominoes, int dominoesSize, int* dominoesColSize)
{
    int cnt = 0;
    int arr[10][10] = { 0 };
    for (int i = 0; i < dominoesSize; i++)
    {
        int x = dominoes[i][0], y = dominoes[i][1];
        arr[x][y]++, arr[y][x]++;
    }
    for (int i = 1; i < 10; i++)
    {
        for (int j = 1; j <= i; j++)
        {
            if (i == j)
                arr[i][j] /= 2;
            cnt += arr[i][j] * (arr[i][j] - 1) / 2;
        }
    }
    return cnt;
}